define(["jquery", "easy-admin", "treetable"], function ($, ea) {
    var table = layui.table,
        treetable = layui.treetable;
    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'mall.orderRanking/index',
        edit_url: 'mall.orderRanking/edit',
        export_url: 'mall.orderRanking/export'
    };
    var Controller = {
        index: function () {
            ea.table.render({
                init: init,
                height:'full-50',
                toolbar: ['refresh',
                    [],
                    ],
                cols: [[
                    {type: 'checkbox'},
                    {field: 'specs', title: '类型', selectList: {1:'形状',2:'口味',3:'工艺',4:'浇头'}},
                    {field: 'specs_name', title: '值'},
                    {field: 'counts', title: '数量'},
                    {field: 'create_time', title: '消费时间', width:170,search: 'range',searchValue:valueTime},
                ]],
            });
            ea.listen();
        },
        edit:function (){
            ea.listen();
        }
    }
    return Controller;
});